// import com.alibaba.druid.sql.ast.SQLExpr_ptr;
// import com.alibaba.druid.sql.ast.SQLName_ptr;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "SQLAlterFunctionStatement.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../SQLName.h"

BOOL_ptr SQLAlterFunctionStatement::isDebug()
{
  return debug;
}

void SQLAlterFunctionStatement::setDebug(BOOL_ptr debug)
{
  this->debug = debug;
}

SQLName_ptr SQLAlterFunctionStatement::getName()
{
  return name;
}

void SQLAlterFunctionStatement::setName(SQLName_ptr name)
{
  if (name != nullptr)
  {
    name->setParent(SharedObject(SQLAlterFunctionStatement));
  }
  this->name = name;
}

SQLExpr_ptr SQLAlterFunctionStatement::getComment()
{
  return comment;
}

void SQLAlterFunctionStatement::setComment(SQLExpr_ptr comment)
{
  if (comment != nullptr)
  {
    comment->setParent(SharedObject(SQLAlterFunctionStatement));
  }
  this->comment = comment;
}

BOOL_ptr SQLAlterFunctionStatement::isReuseSettings()
{
  return reuseSettings;
}

void SQLAlterFunctionStatement::setReuseSettings(BOOL_ptr x)
{
  this->reuseSettings = x;
}

BOOL_ptr SQLAlterFunctionStatement::isLanguageSql()
{
  return languageSql;
}

void SQLAlterFunctionStatement::setLanguageSql(BOOL_ptr languageSql)
{
  this->languageSql = languageSql;
}

BOOL_ptr SQLAlterFunctionStatement::isContainsSql()
{
  return containsSql;
}

void SQLAlterFunctionStatement::setContainsSql(BOOL_ptr containsSql)
{
  this->containsSql = containsSql;
}

SQLExpr_ptr SQLAlterFunctionStatement::getSqlSecurity()
{
  return sqlSecurity;
}

void SQLAlterFunctionStatement::setSqlSecurity(SQLExpr_ptr sqlSecurity)
{
  if (sqlSecurity != nullptr)
  {
    sqlSecurity->setParent(SharedObject(SQLAlterFunctionStatement));
  }
  this->sqlSecurity = sqlSecurity;
}

// @Override
void SQLAlterFunctionStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLAlterFunctionStatement)))
  {
    acceptChild(visitor, name);
    acceptChild(visitor, comment);
    acceptChild(visitor, sqlSecurity);
  }
  visitor->endVisit(SharedObject(SQLAlterFunctionStatement));
}

// @Override
SQLDDLStatement::DDLObjectType SQLAlterFunctionStatement::getDDLObjectType()
{
  return SQLDDLStatement::DDLObjectType::FUNCTION;
}
